package com.program.beautymakeup.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.program.beautymakeup.domain.entity.Portfolio;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PortfolioMapper extends BaseMapper<Portfolio> {
    int deleteByPrimaryKey(Integer id);

    int insert(Portfolio record);

    int insertSelective(Portfolio record);

    Portfolio selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Portfolio record);

    int updateByPrimaryKey(Portfolio record);

    /**
     * 根据分页信息获得作品集
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<Portfolio> selectAll(@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize, @Param("type") Integer type);
    List<Portfolio> selectByName(String keyword);

    List<Portfolio> selectByUserIdAndType(@Param("userId") Integer userId, @Param("type")Integer type);
}